﻿// --------------------------------
// <copyright file="IProductRepository.cs" company="OpenTicket">
//     Microsoft Public License (Ms-PL)
// </copyright>
// <author>Glenn</author>
// ---------------------------------

using System.Linq;

namespace OpenTicket.Repositories
{
    /// <summary>
    /// Repository for products
    /// </summary>
    public interface IProductRepository 
    {
        /// <summary>
        /// Gets all Products from persistance
        /// </summary>
        /// <returns>All Products</returns>
        IQueryable<OpenTicket.Model.Product> GetAll();

        /// <summary>
        /// Saves a Product object to persistance
        /// </summary>
        /// <param name="product">The Product to save</param>
        /// <returns>The saved Product (with Id on insert)</returns>
        Model.Product Save(Model.Product product);

        /// <summary>
        /// Deletes the product.
        /// </summary>
        /// <param name="product">The product.</param>
        void DeleteProduct(Model.Product product);
    } 
}
